package com.bawei.hgshop.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("index")
public class IndexController  {
	
	@RequestMapping("/")
	public String index() {
		return "index";
	}
	
	@RequestMapping("myurl")
	@ResponseBody
	public String check(String tel,String card,String sha) {
		
		String sha1 = sh1(tel+card);
		
		
		return sha1.equals(sha)?"ok":"failed";
	}
	
	public String sh1(String s) {
		return "ss";
	}

}
